function [GB, G, B] = FormGB_former(TransFormer_Branch, Normal_Branch, PQ_Node,PV_Node, Node_Num, m_Node)
% �γɵ��ɾ���
GB = zeros(Node_Num, Node_Num);
% ��ѹ��֧·����
for m = 1 : size(TransFormer_Branch, 1) 
    i = TransFormer_Branch(m,1);
    j = TransFormer_Branch(m,2);                                                                                                                                   
    RX = sqrt(-1)* TransFormer_Branch(m,3);
    k = TransFormer_Branch(m,4);
    %k = 1/TransFormer_Branch(m,4);
    GB(i,j) = GB(i,j)- 1/ RX / k;
    GB1(i,j) = - 1/ RX / k;
    GB(j,i) = GB(i,j);
    GB(i,i) =  GB(i,i) - GB1(i,j) + (k-1) / k / RX;
    GB(j,j) =  GB(j,j) - GB1(i,j) + (1-k) / k^2 / RX;         
end
% �����·֧·����
for m = 1 : size(Normal_Branch, 1) 
    i = Normal_Branch(m,1);
    j = Normal_Branch(m,2);
    RX = Normal_Branch(m,3) + sqrt(-1)* Normal_Branch(m,4);
    B_2 = sqrt(-1)* Normal_Branch(m,5);
    Yij =  - 1 / RX;
    GB(i,j) = GB(i,j) + Yij;
    GB(j,i) = GB(i,j);
    GB(i,i) =  GB(i,i) - Yij - B_2;
    GB(j,j) =  GB(j,j) - Yij - B_2;
end
for m = 1:size(PQ_Node)
    i = PQ_Node(m,1);
    GB(i,i) = GB(i,i) + sqrt(-1)*PQ_Node(m,6);
end
for m = 1:size(PV_Node)
    i = PV_Node(m,1);
    GB(i,i) = GB(i,i) - sqrt(-1)*PV_Node(m,8);
end
GB2 = GB;
for i = 1:Node_Num
    v = m_Node(i).NodeID;
    for j = 1:Node_Num
        w = m_Node(j).NodeID;
        GB(i,j) = GB2(v,w);
    end
end
G = real( GB );% ���ɾ���ʵ��
B = imag( GB );% ���ɾ����鲿
GB;
